package com.youlai.boot.system.model.form;

import java.io.Serial;
import java.io.Serializable;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;

import java.time.LocalDate;
import java.time.LocalDateTime;
import jakarta.validation.constraints.*;

/**
 * 患者信息表单对象
 *
 * @author
 * @since 2025-03-03 16:25
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@Schema(description = "患者信息表单对象")
public class PatientForm implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;
    @Schema(description = "序号")
    private Long id;

    @Schema(description = "姓名")
    @NotBlank(message = "姓名不能为空")
    private String patientName;

    @Schema(description = "性别")
    private String gender;

    @Schema(description = "年龄")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime birthday;

    @Schema(description = "电话")
    @Pattern(regexp = "^$|^1(3\\d|4[5-9]|5[0-35-9]|6[2567]|7[0-8]|8\\d|9[0-35-9])\\d{8}$", message = "手机号码格式不正确")
    private String phoneNumber;

    @Schema(description = "住址")
    private String address;

    @Schema(description = "紧急联系人")
    @Pattern(regexp = "^$|^1(3\\d|4[5-9]|5[0-35-9]|6[2567]|7[0-8]|8\\d|9[0-35-9])\\d{8}$", message = "手机号码格式不正确")
    private String emergencyContac;

    @Schema(description = "主治医生")
    private String attendingDoctor;

    @Schema(description = "诊断结果")
    private String diagnosi;

    @Schema(description = "入院时间")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime admissionDate;

    @Schema(description = "出院时间")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime dischargeDate;

    @Schema(description = "主诉（症状描述）")
    private String complaint;

    @Schema(description = "疾病诊断")
    private String diagno;

    @Schema(description = "既往病史")
    private String anamnes;

    @Schema(description = "合并症")
    private String complication;

    @Schema(description = "手术名称")
    private String operation;

    @Schema(description = "手术时间")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime operationDate;

    @Schema(description = "主刀医生")
    private String surgeon;

    @Schema(description = "麻醉方式")
    private String anesthesia;

    @Schema(description = "手术时间（总时长）")
    private String operationTime;

    @Schema(description = "术中出血量")
    private String peroperativ;

    @Schema(description = "输血量（记录总数）")
    private String transfusion;

    @Schema(description = "是否归档（1已归档/0未归档)")
    private Integer archive;

    @Schema(description = "创建时间")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime addtime;


}
